$('#picture_to_assign_<%= @picture.id %> a').attr('href', '#').off('click');
$('#<%= @content.dom_id -%>').replaceWith('<%= j(
  render(
    "alchemy/essences/essence_picture_editor",
    content: @content,
    options: @options
  )
) %>');

<% if @content.siblings.essence_pictures.count > 1 %>

Alchemy.SortableContents('#<%= @content.element.id -%>_contents', '<%= form_authenticity_token %>');

<% end %>

Alchemy.closeCurrentDialog();
Alchemy.setElementDirty('#element_<%= @content.element.id %>');
